﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using DataLayer.Entities;



namespace DataLayer
{
    /// <summary>
    /// Singleton that performs all searches
    /// </summary>
    public class Search
    {
        #region Constructor
        private Search()
        {

        }
        #endregion

        #region Sample Results
        private static IList<SearchResult> SampleResults = new List<SearchResult>
        {
            new SearchResult (){ID="Ho", ImageUrl="/user/Ho"},
            new SearchResult (){ID="Luong", ImageUrl="/user/Luong"}
        };
        #endregion

        #region Search Methods

        /// <summary>
        /// Return sample data
        /// TODO: Add code to search against database
        /// </summary>
        /// <param name="searchText"></param>
        /// <returns></returns>
        public static IList<SearchResult> SearchAll(string searchText)
        {

            return SampleResults;
        }


        /// <summary>
        /// Return sample data
        /// TODO: Add code to search against database
        /// </summary>
        /// <param name="searchText"></param>
        /// <returns></returns>
        public static IList<SearchResult> SearchAdvance(string searchText)
        {

            return SampleResults;
        }


        /// <summary>
        /// Return sample data
        /// TODO: Nguyen Hai Ho - Add code to search against database
        /// </summary>
        /// <param name="searchText"></param>
        /// <returns></returns>
        public static IList<SearchResult> SearchGPS(string searchText)
        {

            return SampleResults;
        }

        #endregion
    }
}
